package com.springboot.ww.platform.pd.ctms.api;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 描述：
 *
 * @author 🧑 ‍wanwei
 * @since 2024-09-18 10:54
 */
@NoArgsConstructor
@Data
public class PdUnShipPackageResp {


	@JsonProperty("result")
	private ResultDTO result;
	@JsonProperty("success")
	private Boolean success;
	@JsonProperty("requestId")
	private String requestId;
	@JsonProperty("errorCode")
	private Integer errorCode;
	@JsonProperty("errorMsg")
	private String errorMsg;

	@NoArgsConstructor
	@Data
	public static class ResultDTO {
		@JsonProperty("unshippedPackage")
		private List<UnshippedPackageDTO> unshippedPackage;
		@JsonProperty("totalItemNum")
		private Integer totalItemNum;

		@NoArgsConstructor
		@Data
		public static class UnshippedPackageDTO {
			@JsonProperty("carrierName")
			private String carrierName;
			@JsonProperty("packageDetail")
			private PackageDetailDTO packageDetail;
			@JsonProperty("packageSn")
			private String packageSn;
			@JsonProperty("carrierId")
			private Integer carrierId;
			@JsonProperty("trackingNumber")
			private String trackingNumber;

			@NoArgsConstructor
			@Data
			public static class PackageDetailDTO {
				@JsonProperty("canceledOrders")
				private List<?> canceledOrders;
				@JsonProperty("shippableOrders")
				private List<ShippableOrdersDTO> shippableOrders;

				@NoArgsConstructor
				@Data
				public static class ShippableOrdersDTO {
					@JsonProperty("quantity")
					private Integer quantity;
					@JsonProperty("orderSn")
					private String orderSn;
					@JsonProperty("parentOrderSn")
					private String parentOrderSn;
				}
			}
		}
	}
}
